package com.etc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AController2 {

	@Autowired
	ServiceA service;
	@GetMapping("testa1")
	public String test1() {
		String msg;
		try {
			msg = service.execute1("1000");
		} catch (BusinessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return "fail";
		}
		System.out.println(msg);
		return "sucess";
	}
}
